// 基础类型定义

export interface MenuItem {
  id: string
  label: string
  title: string
  path: string
  icon?: string
  to?: string
  children?: MenuItem[]
}

export interface BlogPost {
  id: string
  title: string
  slug: string
  content: string
  excerpt: string
  author: {
    name: string
    avatar?: string
  }
  category: {
    name: string
    slug: string
  }
  tags: Array<{
    name: string
    slug: string
    color?: string
  }>
  coverImage?: string
  readTime: number
  views: number
  likes: number
  publishDate?: string
  createdAt: string
  updatedAt: string
}

export interface Category {
  id: string
  name: string
  slug: string
  description?: string
  postCount: number
}

export interface Tag {
  id: string
  name: string
  slug: string
  color?: string
  postCount: number
}

export interface ApiResponse<T = any> {
  success: boolean
  message: string
  data?: T
  error?: string
  pagination?: {
    page: number
    total: number
    pageSize: number
    totalPages: number
  }
}

// 后端API响应类型
export interface ServerApiResponse<T = any> {
  success: boolean
  message: string
  data?: T
  error?: string
  pagination?: {
    page: number
    total: number
    pageSize: number
    totalPages: number
  }
}

export interface PaginatedResponse<T> {
  data: T[]
  pagination?: {
    page: number
    total: number
    pageSize: number
    totalPages: number
  }
}